/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.atm.controller;

import javax.inject.Named;
import javax.enterprise.context.RequestScoped;
import javax.faces.context.FacesContext;
import javax.servlet.http.HttpSession;

/**
 *
 * @author cj
 */
@Named(value="authenticationBean")
@RequestScoped
public class AuthenticationBean {

    /** Creates a new instance of AuthenticationBean */
    public AuthenticationBean() {
    }

    public String logout() {
        ((HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(true)).invalidate();
        return "logoutConfirmation";
    }
}
